package org.zfm.util.data.consumer;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.zfm.base.Notice;
import org.zfm.config.RegisterNoticeRabbitmqConfig;

@Component
public class RegisterNoticeSmsReceiveHandler {
    //监听email队列
    @RabbitListener(queues = {RegisterNoticeRabbitmqConfig.QUEUE_INFORM_EMAIL})
    public void receive_sms(Notice notice, Message message, Channel channel) {
        System.out.println(notice.getReceiver());
        System.out.println(notice.getContent());
        System.out.println(message);
        System.out.println(channel);
        //就可以使用短信技术进行发送 @TODO
    }
}